package com.gc.server.dao;

import com.gc.server.entity.ShopEntity;
import com.gc.server.vo.ShopVo;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * 药店Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Fri Oct 16 18:10:43 CST 2020
 */
@Mapper
public interface ShopDao extends BaseDao<ShopEntity> {

    List<ShopVo> findVo(ShopVo vo);

    ShopVo getVo(Long id);


    List<ShopEntity> findByUserId(Long userId);

    List<ShopEntity> findByRouteId(Long routeId);

    ShopEntity findByCode(String code);

    void rmUser(@Param("userId") Long userId, @Param("shopId") Long shopId);

    void rmUserByUserId(@Param("userId") Long userId);

    void addUser(@Param("shopId") Long shopId, @Param("userIds") List<Long> userIds);

    void addShop(@Param("shopIds") List<Long> shopIds, @Param("userId") Long userId);

}
